﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using model;
using Bll;

public partial class EA : System.Web.UI.Page
{
    ApplicationBll bll = new ApplicationBll();
    protected void Page_Load(object sender, EventArgs e)
    {
            BindGridView();
    }
    void BindGridView()
    {
        List<model.Application> apps = bll.GetList(Session["userid"].ToString());
        this.GridView1.DataSource = apps;
        this.GridView1.DataBind();
    }
    protected void btnInsert_Click(object sender, EventArgs e)
    {
        Response.Redirect("inserta.aspx");
    }
    protected void lbtndelete_Click(object sender, EventArgs e)
    {
        string ano = ((LinkButton)sender).CommandArgument;
        Response.Redirect("deletea.aspx?ano="+ano);
    }
}